package com.neu.cloudFactory.VO;

import com.neu.cloudFactory.PO.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class OrderVO {
    private String id;
    private String code;
    private String proName;
    private String amount;
    private String handInDate;
    private String deadline;
    private String receiver;
    private String phone;
    private String address;
    private String factoryState;
    private String customerState;
    private String factoryAccount;//中标工厂对应的user account

    public OrderVO (Order order){
        this.id = Integer.toString(order.getId());
        this.code = order.getCode();
        this.proName = order.getProductName();
        this.amount = order.getAmount();
        this.handInDate = order.getHandInDate();
        this.deadline = order.getDeadline();
        this.receiver = order.getReceiver();
        this.phone = order.getPhone();
        this.address = order.getAddress();
        this.factoryState = order.getOrderStateForFactory();
        this.customerState = order.getOrderStateForCustomer();
    }


}
